package com.xuxin.baby.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xuxin.baby.R;
import com.xuxin.baby.bean.ChildSicknessBean;
import com.xuxin.baby.utils.BaseUtils;

import org.jetbrains.annotations.NotNull;

/**
 * Created by xu_xin
 * Created on 2020.08.18 0018
 * 看病记录
 */
public class ChildSicknessAdapter extends BaseQuickAdapter<ChildSicknessBean.ResultBean.ItemsBean, BaseViewHolder> {

    public ChildSicknessAdapter() {
        super(R.layout.item_child_sickness);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, ChildSicknessBean.ResultBean.ItemsBean itemsBean) {
        String name = itemsBean.getMedicalRecord() + "; " + itemsBean.getAddress();
        holder.setText(R.id.item_child_sickness_name, name);
        holder.setText(R.id.item_child_sickness_time, BaseUtils.getTime(itemsBean.getEventDate()));
    }
}